package UserUI;

import loginUI.LoginFrame;
import userManageUI.ChangePassWordFrame;
import courseManageUI.CourseDescriptionFrame;
import courseManageUI.CourseDetailFrame;
import courseManageUI.CourseScoreFrame;
import courseManageUI.MyCourseFrame;
import VO.UserVO;

public class TeacherController {

	private static UserVO userVO;
	private static TeacherFrame teacherFrame;
	private static MyCourseFrame myCourseFrame;
	private static CourseDescriptionFrame courseDescriptionFrame;
	private static CourseScoreFrame courseScoreFrame;
	private static ChangePassWordFrame changePassWordFrame;
	
	public TeacherController(UserVO userVO){
		this.userVO = userVO;
		teacherFrame = new TeacherFrame(this.userVO);
		myCourseFrame = new MyCourseFrame(this.userVO);
		courseScoreFrame = new CourseScoreFrame(this.userVO);
		courseDescriptionFrame = new CourseDescriptionFrame(this.userVO); 
		changePassWordFrame = new ChangePassWordFrame(this.userVO);
	}
	public TeacherController(){
	
	}
	
	public static void jumpTo(String frame){
		switch(frame){
		case"login":
			new LoginFrame().setVisible(true);break;
		case"main":
			teacherFrame.setVisible(true);break;
		case"myCourseFrame":
			myCourseFrame.setVisible(true);break;
		case"courseScoreFrame":
			courseScoreFrame.setVisible(true);break;
		case"courseDescriptionFrame":
			courseDescriptionFrame.setVisible(true);break;
		case"changePassWordFrame":
			changePassWordFrame.setVisible(true);break;
		
		}
	}
}
